package com.overlord.im.commons.message;

import com.overlord.im.commons.constant.AckType;
import com.overlord.im.commons.constant.MsgType;
import com.overlord.im.commons.constant.SystemType;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @ClassName OverlordMessage
 * @Author wuwei
 * @Description NONE
 * @Date 2020/5/29 14:09
 **/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class OverlordImMessage implements Serializable {

    private static final long serialVersionUID = 2808544440858069254L;

    /**
     * 版本
     */
    private int version;

    /**
     * 用户token
     */
    private String token;

    /**
     * 客户端定义的唯一id
     */
    private Long clientMessageId;

    /**
     * sessionId
     */
    private String sessionId;

    /**
     * 消息的序列号
     */
    private Long sequenceId;

    /**
     * 发送人id
     */
    private Long from;

    /**
     * 接收人id
     */
    private Long to;

    /**
     * 消息类型
     */
    private MsgType msgType;

    /**
     * 消息确认类型
     */
    private AckType ackType = AckType.NONE;

    /**
     * 系统消息类型
     */
    private SystemType systemType = SystemType.NONE;

    /**
     * 文本内容
     */
    private String content;

    /**
     * 发送的时间
     */
    private LocalDateTime sendTime;
}
